import React, { FC } from 'react';
import { View, Text } from '@tarojs/components';
import { styled } from 'linaria/react';
import { useClassName } from '@/utils/index';
import { useContactUs } from './useContactUs';
import Card from './Card/Card';
import RootPageComponent from '../components/RootPageComponent/RootPageComponent';
import RootPageComponentGotoMenu from '@/pages/components/RootPageComponentGotoMenu/RootPageComponentGotoMenu';
export interface IProps extends ICompProps {}
ContactUs.defaultProps = {} as Partial<IProps>;
function ContactUs(props: IProps) {
    const { className, style } = props;
    const localClassName = useClassName('ContactUs', className);
    const { listArr } = useContactUs();
    return (
        <RootView className={localClassName} style={style}>
            <RootPageComponent leftTitle="联系我们" headNavContentRightSlot={<RootPageComponentGotoMenu />}>
                <View className="ContactUs_container">
                    {listArr.map((item, index) => {
                        return (
                            <Card key={index} content={item.content} title={item.title} iconCode={item.iconCode}></Card>
                        );
                    })}
                </View>
            </RootPageComponent>
        </RootView>
    );
}
export default React.memo(ContactUs as FC<IProps>);
const RootView = styled(View)`
    &.ContactUs {
        .ContactUs_container {
            padding: 40px 60px 60px 60px;
        }
    }
`;
